<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>IFlySpeechSynthesizer Class Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1334)">
</head>
<body class="appledoc">
	<header>
		<div class="container" class="hide-in-xcode">
			
			<h1 id="library-title">
				<a href="../index.html">IFlyMSC </a>
			</h1>

			<p id="developer-home">
				<a href="../index.html">iflytek</a>
			</p>
			
		</div>
	</header>

	<aside>
		<div class="container">
			<nav>
				<ul id="header-buttons" role="toolbar">
					<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>

					<li id="on-this-page" role="navigation">
						<label>
							On This Page

							<div class="chevron">
								<div class="chevy chevron-left"></div>
								<div class="chevy chevron-right"></div>
							</div>

							<select id="jump-to">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	

	
	
	<option value="tasks">Tasks</option>
	
	

	
	
	<optgroup label="Properties">
		
		<option value="//api/name/delegate">delegate</option>
		
		<option value="//api/name/isSpeaking">isSpeaking</option>
		
	</optgroup>
	

	
	<optgroup label="Class Methods">
		
		<option value="//api/name/destroy">+ destroy</option>
		
		<option value="//api/name/sharedInstance">+ sharedInstance</option>
		
	</optgroup>
	

	
	<optgroup label="Instance Methods">
		
		<option value="//api/name/parameterForKey:">- parameterForKey:</option>
		
		<option value="//api/name/pauseSpeaking">- pauseSpeaking</option>
		
		<option value="//api/name/resumeSpeaking">- resumeSpeaking</option>
		
		<option value="//api/name/setParameter:forKey:">- setParameter:forKey:</option>
		
		<option value="//api/name/startSpeaking:">- startSpeaking:</option>
		
		<option value="//api/name/stopSpeaking">- stopSpeaking</option>
		
		<option value="//api/name/synthesize:toUri:">- synthesize:toUri:</option>
		
	</optgroup>
	
	
</select>
						</label>
					</li>
				</ul>
			</nav>
		</div>
	</aside>

	<article>
		<div id="overview_contents" class="container">
			<div id="content">
				<main role="main">
					<h1 class="title">IFlySpeechSynthesizer Class Reference</h1>

					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<th>Inherits from</th>
	<td>NSObject</td>
</tr><tr>
	<th>Declared in</th>
	<td>IFlySpeechSynthesizer.h</td>
</tr>
						</tbody></table></div>
					

                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>语音合成</p>
					</div>
					
					

					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						

						
						

						<div class="task-list">
							<div class="section-method">
	<a name="//api/name/delegate" title="delegate"></a>
	<h3 class="method-title"><code><a href="#//api/name/delegate">&nbsp;&nbsp;delegate</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>设置识别的委托对象</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) id&lt;IFlySpeechSynthesizerDelegate&gt; delegate</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlySpeechSynthesizer.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/sharedInstance" title="sharedInstance"></a>
	<h3 class="method-title"><code><a href="#//api/name/sharedInstance">+&nbsp;sharedInstance</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>返回合成对象的单例</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (instancetype)sharedInstance</code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>合成对象</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlySpeechSynthesizer.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/destroy" title="destroy"></a>
	<h3 class="method-title"><code><a href="#//api/name/destroy">+&nbsp;destroy</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>销毁合成对象。</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (BOOL)destroy</code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>成功返回YES,失败返回NO.</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlySpeechSynthesizer.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/setParameter:forKey:" title="setParameter:forKey:"></a>
	<h3 class="method-title"><code><a href="#//api/name/setParameter:forKey:">&ndash;&nbsp;setParameter:forKey:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>设置合成参数</p>

<table>
<thead>
<tr><th>参数</th><th><em>描述</em></th>
</tr>
</thead>
<tbody>
<tr><td>speed</td><td>合成语速,取值范围 0~100</td></tr>
<tr><td>volume</td><td>合成的音量,取值范围 0~100</td></tr>
<tr><td>voice_name</td><td>默认为”xiaoyan”；可以设置的参数列表可参考个性化发音人列表</td></tr>
<tr><td>sample_rate</td><td>采样率:目前支持的采样率设置有 16000 和 8000。</td></tr>
<tr><td>tts_audio_path</td><td>音频文件名 设置此参数后，将会自动保存合成的音频文件。<br/>路径为Documents/(指定值)。不设置或者设置为nil，则不保存音频。</td></tr>
<tr><td>params</td><td>扩展参数: 对于一些特殊的参数可在此设置。</td></tr>
</tbody>
</table>

			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (BOOL)setParameter:(NSString *)<em>value</em> forKey:(NSString *)<em>key</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>value</code></th>
						<td><p>参数取值</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>key</code></th>
						<td><p>合成参数</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>设置成功返回YES，失败返回NO</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlySpeechSynthesizer.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/parameterForKey:" title="parameterForKey:"></a>
	<h3 class="method-title"><code><a href="#//api/name/parameterForKey:">&ndash;&nbsp;parameterForKey:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>获取合成参数</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (NSString *)parameterForKey:(NSString *)<em>key</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>key</code></th>
						<td><p>参数key</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>参数值</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlySpeechSynthesizer.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/startSpeaking:" title="startSpeaking:"></a>
	<h3 class="method-title"><code><a href="#//api/name/startSpeaking:">&ndash;&nbsp;startSpeaking:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>开始合成(播放)
调用此函数进行合成，如果发生错误会回调错误<code>onCompleted</code></p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)startSpeaking:(NSString *)<em>text</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>text</code></th>
						<td><p>合成的文本,最大的字节数为1k</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlySpeechSynthesizer.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/synthesize:toUri:" title="synthesize:toUri:"></a>
	<h3 class="method-title"><code><a href="#//api/name/synthesize:toUri:">&ndash;&nbsp;synthesize:toUri:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>开始合成(不播放)
调用此函数进行合成，如果发生错误会回调错误<code>onCompleted</code></p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)synthesize:(NSString *)<em>text</em> toUri:(NSString *)<em>uri</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>text</code></th>
						<td><p>合成的文本,最大的字节数为1k</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>uri</code></th>
						<td><p>合成后，保存再本地的音频路径</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlySpeechSynthesizer.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/pauseSpeaking" title="pauseSpeaking"></a>
	<h3 class="method-title"><code><a href="#//api/name/pauseSpeaking">&ndash;&nbsp;pauseSpeaking</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>暂停播放
暂停播放之后，合成不会暂停，仍会继续，如果发生错误则会回调错误<code>onCompleted</code></p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)pauseSpeaking</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlySpeechSynthesizer.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/resumeSpeaking" title="resumeSpeaking"></a>
	<h3 class="method-title"><code><a href="#//api/name/resumeSpeaking">&ndash;&nbsp;resumeSpeaking</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>恢复播放</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)resumeSpeaking</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlySpeechSynthesizer.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/stopSpeaking" title="stopSpeaking"></a>
	<h3 class="method-title"><code><a href="#//api/name/stopSpeaking">&ndash;&nbsp;stopSpeaking</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>停止播放并停止合成</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)stopSpeaking</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlySpeechSynthesizer.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/isSpeaking" title="isSpeaking"></a>
	<h3 class="method-title"><code><a href="#//api/name/isSpeaking">&nbsp;&nbsp;isSpeaking</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>是否正在播放</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) BOOL isSpeaking</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlySpeechSynthesizer.h</code></p>
			</div>
			
			
		</div>
	</div>
</div>
						</div>
						
					</div>
					
					

                    
                    
          
				</main>

				<footer>
					<div class="footer-copyright">
						
						<p class="copyright">Copyright &copy; 2016 iflytek. All rights reserved. Updated: 2016-05-25</p>
						
						
						<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
						
					</div>
				</footer>
			</div>
		</div>
	</article>

	<script src="../js/script.js"></script>
</body>
</html>